package com.syh.jn.scm.domain.supplier.repository.sale;

import com.syh.core.ddd.infrastructure.repository.AggregateRepository;
import com.syh.core.ddd.infrastructure.repository.CreateRepo;
import com.syh.core.ddd.infrastructure.repository.DeleteRepo;
import com.syh.core.ddd.infrastructure.repository.UpdateRepo;
import com.syh.jn.scm.domain.supplier.entity.sale.SaleOrder;
import com.syh.jn.scm.domain.supplier.entity.sale.SaleOrderItem;

import java.util.List;


/**
 * Date:2018/7/16
 * Author:Clown
 * Desc;
 */
public interface SaleOrderRepository extends SaleOrderReadRepository, CreateRepo<SaleOrder,Long>, DeleteRepo<SaleOrder,Long>, UpdateRepo<SaleOrder,Long> {
  /**
   * 修改订单状态，与重写父类的update方法不同的是不会修改订单项只修改主体的状态
   * @param saleOrder
   */
  public void updateStatus(SaleOrder saleOrder);

  /**
   * 提交发货信息
   * @param saleOrder
   */
  public void updateOrderAndItems(SaleOrder saleOrder);


  /**
   * 上传单据图片
   * @param order
   */
  public void upload(SaleOrder order);

  void deleteByBusinessEntityId(Long businessEntityId);

}
